package com.hksj.wmp.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hksj.common.core.model.Rest;
import com.hksj.wmp.query.MyInfoQuery;
import com.hksj.wmp.service.WeChatMyInfoService;
import com.hksj.wmp.vo.AlarmNotifyVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zengke
 * @version 1.0
 * @see WeChatMyInfoController
 * @since 2024/10/17 11:36
 */

@Api(tags = "微信小程序-我的")
@RestController
@RequestMapping("/api/wx/wechatMyInfo")
public class WeChatMyInfoController {

    @Autowired
    private WeChatMyInfoService wechatMyInfoService;

    @ApiOperation(value = "分页查询报警通知历史列表",response = AlarmNotifyVO.class)
    @PostMapping("/queryAlarmNotifyHistoryListByPaging")
    @ApiImplicitParams(value = {

    })
    public Rest<IPage<AlarmNotifyVO>> queryAlarmNotifyHistoryListByPaging(@RequestBody @Validated MyInfoQuery query){
        IPage<AlarmNotifyVO> alarmNotifyList = wechatMyInfoService.queryAlarmNotifyHistoryListByPaging(query);
        return Rest.ok(alarmNotifyList);
    }

}
